home *** CD-ROM | disk | FTP | other *** search
/ C/C++ Users Group Library 1996 July / C-C++ Users Group Library July 1996.iso / vol_400 / 436_01 / incon.h < prev    next >
Text File  |  1994-10-07  |  2KB  |  60 lines

  1. /*************************************************************************
  2.     Header file:  INCON.H
  3.  
  4.     INCON input handler prototypes state variables and.
  5.  
  6.     Compiler:  Borland Turbo C 2.01
  7.  
  8.     INCON source files and the object and library files created from
  9.     them are:
  10.         Copyright (c) 1993-94, Richard Zigler.
  11.     You may freely distribute unmodified source, object, and library
  12.     files, and incorporate them into your own non-commercial software,
  13.     provided that this paragraph and the program name and copyright
  14.     strings defined in INCON.C are included in all copies.
  15. *************************************************************************/
  16.  
  17. #if !defined(INCON_STATE)
  18. #define INCON_STATE
  19.  
  20. /**** Program States ****/
  21.  
  22. typedef enum
  23.             {
  24.             stError                = -1    ,
  25.             stQuit                        ,        /* [Enter] -- end input                */
  26.             stInit                        ,        /* field initialization                */
  27.             stFieldClear                ,        /* [Esc] -- clear field or exit    */
  28.             stDeleteCharLeft            ,        /* [Backspace] -- delete left        */
  29.             stMoveToStart                ,        /* [Home] -- start of field        */
  30.             stMoveCharLeft                ,        /* [Left Arrow] -- move char lt    */
  31.             stMoveCharRight            ,        /* [Right Arrow] -- move char rt    */
  32.             stMoveToEnd                    ,        /* [End] -- end of field            */
  33.             stMoveWordLeft                ,        /* [Ctrl Left] -- move word lt    */
  34.             stMoveWordRight            ,        /* [Ctrl Right] -- move word rt    */
  35.             stDeleteWordLeft            ,        /* [Ctrl L] -- delete word left    */
  36.             stDeleteWordRight            ,        /* [Ctrl R] -- delete word right    */
  37.             stDeleteToEnd                ,        /* [Ctrl End] -- clear to end        */
  38.             stDeleteToStart            ,        /* [Ctrl Home] -- clear to start    */
  39.             stDeleteAtCursor            ,        /* [Del] -- delete at cursor        */
  40.             stExitPlus                    ,        /* [Keypad +] -- special exit        */
  41.             stExitMinus                    ,        /* [Keypad -] -- special exit        */
  42.             stCharMatch                    ,        /* see if entry matches field        */
  43.             }
  44.             STATES                        ;
  45.  
  46. /**** Input Handler Type ****/
  47.  
  48. typedef int                (pascal (* HANDLER)(STATES, int));
  49.  
  50. /**** Prototypes for Input-handling Routines. ****/
  51.  
  52. extern int    pascal    hAlphaField        ( STATES, int    );        /* INALPHA.C    */
  53. extern int    pascal    hIntegerField    ( STATES, int    );        /* ININTGR.C    */
  54. extern int    pascal    hFloatField        ( STATES, int    );        /* INFLOAT.C    */
  55. extern int    pascal    hTemplateField    ( STATES, int    );        /* INTEMPL.C    */
  56.  
  57. #endif
  58.  
  59. /**** EOF:  INCON.H ****/
  60.